Conversation
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
.../org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/testing/TestingBuildBlockV1.java
Outdated
Show resolved
Hide resolved
|
Hiya! Does this also include support for Glamsterdam / BALs? I will point in a comment later on how you can test this testing (lol) RPC endpoint for this specific method! |
I see that the implementation is using EngineNewPayloadV4 so normally not. |
Signed-off-by: Karim Taam <karim.t2am@gmail.com>
|
@jochem-brouwer updated the PR it should be compatible with BAL, I also tested locally for the moment with some tests |
|
This is great, we need this endpoint implemented with BAL/Glamsterdam support to start benchmarking BALs on top of state to get real numbers for BAL optimizations. For this we need one client to "fill" these tests (on top of state). Thanks a lot for this! We'll check it out to see if we can fill these state tests with BALs |
…testing-buildblockv1
There was a problem hiding this comment.
Pull request overview
Implements the proposed testing_buildBlockV1 JSON-RPC method under a new TESTING API group, along with supporting block-creation logic and spec/fixture tests.
Changes:
- Adds
testing_buildBlockV1RPC method, parameter model, and API group wiring. - Introduces a specialized
TestingBlockCreatorand updates payload result ordering to include BAL/slot fields. - Adds integration/unit/spec tests plus chain-data fixtures for
testing_buildBlockV1.
Reviewed changes
Copilot reviewed 23 out of 24 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| ethereum/blockcreation/src/test/java/org/hyperledger/besu/ethereum/blockcreation/TestingBuildBlockIntegrationTest.java | Adds block-creation integration tests validating BAL presence/absence and structure. |
| ethereum/blockcreation/src/main/java/org/hyperledger/besu/ethereum/blockcreation/GenericBlockCreator.java | Updates file header copyright text. |
| ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/testing_buildBlockV1/chain-data/genesis.json | Adds genesis fixture for testing_buildBlockV1 JSON-RPC by-spec tests. |
| ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/testing_buildBlockV1/*.json | Adds JSON-RPC by-spec request/response fixture cases for testing_buildBlockV1. |
| ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/testing/TestingBuildBlockV1Test.java | Adds unit tests for TestingBuildBlockV1 validations and BAL encoding. |
| ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/bonsai/TestingBuildBlockJsonRpcHttpBySpecTest.java | Adds Bonsai HTTP by-spec test runner for the new method. |
| ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/AbstractJsonRpcHttpServiceTest.java | Enables TESTING RPC API and mocks extra mining/tx-selection dependencies. |
| ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/methods/TestingJsonRpcMethods.java | Introduces a new JSON-RPC API group for testing-only methods. |
| ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/methods/JsonRpcMethodsFactory.java | Wires TestingJsonRpcMethods into the methods factory. |
| ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/results/EngineGetPayloadResultV6.java | Adds explicit JSON property order for payload serialization including BAL/slot fields. |
| ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/parameters/TestingBuildBlockParameter.java | Adds request parameter model (parent hash, payload attributes, txs, extraData). |
| ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/testing/TestingBuildBlockV1.java | Implements the testing_buildBlockV1 JSON-RPC method end-to-end. |
| ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/testing/TestingBlockCreator.java | Adds a testing-oriented block creator used by testing_buildBlockV1. |
| ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/RpcMethod.java | Registers new enum entry TESTING_BUILD_BLOCK_V1. |
.../org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/testing/TestingBuildBlockV1.java
Outdated
Show resolved
Hide resolved
.../org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/testing/TestingBuildBlockV1.java
Outdated
Show resolved
Hide resolved
.../org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/testing/TestingBuildBlockV1.java
Outdated
Show resolved
Hide resolved
...rg/hyperledger/besu/ethereum/api/jsonrpc/internal/parameters/TestingBuildBlockParameter.java
Outdated
Show resolved
Hide resolved
...urces/org/hyperledger/besu/ethereum/api/jsonrpc/testing_buildBlockV1/chain-data/genesis.json
Outdated
Show resolved
Hide resolved
.../org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/testing/TestingBuildBlockV1.java
Outdated
Show resolved
Hide resolved
.../test/java/org/hyperledger/besu/ethereum/blockcreation/TestingBuildBlockIntegrationTest.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Karim Taam <karim.t2am@gmail.com>
Signed-off-by: Karim Taam <karim.t2am@gmail.com>
| @@ -0,0 +1,104 @@ | |||
| /* | |||
| * Copyright contributors to Hyperledger Besu. | |||
There was a problem hiding this comment.
We should drop the Hyperledger
There was a problem hiding this comment.
There's a gap in the numbering in the filenames. We go from 4 to 6
There was a problem hiding this comment.
I don't see a gap on my side.
There was a problem hiding this comment.
daniellehrner
left a comment
There was a problem hiding this comment.
I left 2 comments about dropping Hyperldeger from the copyright and a gap in the testfile numbering. The rest looks okay
Signed-off-by: Karim Taam <karim.t2am@gmail.com>
Signed-off-by: Karim Taam <karim.t2am@gmail.com>
Signed-off-by: Karim Taam <karim.t2am@gmail.com> Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Karim Taam <karim.t2am@gmail.com> Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com> Signed-off-by: qu0b <stefan@starflinger.eu>
* TESTING api group allowed (#9946) Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com> Signed-off-by: qu0b <stefan@starflinger.eu> * implement testing_buildBlockV1 (#9838) Signed-off-by: Karim Taam <karim.t2am@gmail.com> Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com> Signed-off-by: qu0b <stefan@starflinger.eu> --------- Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com> Signed-off-by: qu0b <stefan@starflinger.eu> Signed-off-by: Karim Taam <karim.t2am@gmail.com> Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
PR description
related to #9832 which also introduces GenericBlockCreator
RpcMethod.java — Added TESTING_BUILD_BLOCK_V1("testing_buildBlockV1")
Refs a proposed JSON-RPC method, it introduces a new namespace specifically for testing and a new method testing_buildBlockV1 - there is a go-ethereum PR and OpenRPC specs, etc.
ethereum/execution-apis#710
ethereum/execution-apis#747
ethereum/go-ethereum#33656
Thanks for sending a pull request! Have you done the following?
doc-change-requiredlabel to this PR if updates are required.Locally, you can run these tests to catch failures early:
./gradlew spotlessApply./gradlew build./gradlew acceptanceTest./gradlew integrationTest./gradlew ethereum:referenceTests:referenceTests